//
//  ChangePasswordViewController.m
//  ZHIDOU
//
//  Created by 向礼 on 2018/12/25.
//  Copyright © 2018 向礼. All rights reserved.
//

#import "ChangePasswordViewController.h"
#import "MCCountDownView.h"

@interface ChangePasswordViewController ()
@property (weak, nonatomic) IBOutlet UIView *CodeBgView;

@property(nonatomic ,strong)MCCountDownView *codeView;

@end

@implementation ChangePasswordViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setUpSubView];
}

#pragma mark - UI
-(void)setUpSubView{
    self.title = @"修改密码";
    self.view.backgroundColor = [UIColor whiteColor];
    [self setUpVerificationCodeViewFrame:CGRectMake(0, 0 , 76, 37)];
}

//验证码
- (void)setUpVerificationCodeViewFrame:(CGRect)frame
{
    _codeView = [[MCCountDownView alloc] initWithFrame:frame];
    _codeView.bgColor = [UIColor whiteColor];
    _codeView.defaultTitle = @"获取验证码";
    _codeView.originTitleColor = [UIColor blackColor];
    _codeView.dynamicTitleColor = [UIColor blackColor];
    _codeView.maxTimeNum = 60;
    [_CodeBgView addSubview:_codeView];
    __weak __typeof(self)wself = self;
    [_codeView beginClickCodeView:^(MCCountDownView *v) {
        //
        //        if([wself.rechargeMoneyFild.text rangeOfString:@"."].location != NSNotFound){
        //            NSString *lastStr = [[wself.rechargeMoneyFild.text componentsSeparatedByString:@"."] lastObject];
        //            if (lastStr.length > 2) {
        //                [SVProgressHUD showWarningWithTitle:@"只能保留2位小数" inView:self.view];
        //                return;
        //            }
        //        }
        //
        //
        //        [wself purchaseOrder];
        //
    } countBlock:^(NSInteger count) {
    }];
}


@end
